<?php
require_once '../sub/init.php';
if(!is_mobile())header("Location: ".a('{"kind":"my_set"}'));
$currfields = "mob_ifshow,qq_ifshow,weixin_ifshow,weixin_pic_ifshow,email_ifshow,flag,photo_ifshow,ifViewPush,money";
require_once ZEAI.'m/my_chk_u.php';
require_once ZEAI.'cache/config_vip.php';
$data_mob_ifshow        = $row['mob_ifshow'];
$data_qq_ifshow         = $row['qq_ifshow'];
$data_weixin_ifshow     = $row['weixin_ifshow'];
$data_weixin_pic_ifshow = $row['weixin_pic_ifshow'];
$data_email_ifshow      = $row['email_ifshow'];
$data_flag = $row['flag'];
$data_photo_ifshow = $row['photo_ifshow'];
$data_ifViewPush = $row['ifViewPush'];
$cook_money = $row['money'];
switch ($submitok) {
	case 'ajax_set':
		if(empty($objname))exit(JSON_ERROR);
		if($v==1){
			$v_str='设置成功';
		}else{
			$v=0;
			$v_str='设置成功';
		}
		switch ($objname) {
			case 'mob_ifshow':$sql="mob_ifshow=".$v;break;
			case 'qq_ifshow':$sql="qq_ifshow=".$v;break;
			case 'weixin_ifshow':$sql="weixin_ifshow=".$v;break;
			case 'weixin_pic_ifshow':$sql="weixin_pic_ifshow=".$v;break;
			case 'email_ifshow':$sql="email_ifshow=".$v;break;
		}
		$db->query("UPDATE ".__TBL_USER__." SET ".$sql." WHERE id=".$cook_uid);
		json_exit(array('flag'=>1,'msg'=>$v_str));
	break;
	exit;break;case 'passmodupdate':
		if (str_len($form_password1)<6 || str_len($form_password1)>20)json_exit(array('flag'=>0,'msg'=>'“新密码”请在20字节以内。'));
		if (str_len($form_password2)<6 || str_len($form_password2)>20)json_exit(array('flag'=>0,'msg'=>'“确认新密码”请在20字节以内。'));
		if ($form_password1 <> $form_password2)json_exit(array('flag'=>0,'msg'=>'两次密码输入不一样，请重试！'));
		$password = trimm($form_password1);
		$password = md5($password);
		$old_password = md5($old_password);
		$rt = $db->query("SELECT id FROM ".__TBL_USER__." WHERE id=".$cook_uid." AND pwd='$old_password'");
		if(!$db->num_rows($rt))json_exit(array('flag'=>0,'msg'=>'旧密码验证错误，提交失败！'));
		$db->query("UPDATE ".__TBL_USER__." SET pwd='$password' WHERE id=".$cook_uid);
		setcookie("cook_pwd",$password,time()+720000,"/",$_ZEAI['CookDomain']);
		json_exit(array('flag'=>1,'msg'=>'修改成功！'));
	break;
	exit;break;case 'my_delmy':
		if($_VIP['hidedel']!=1)json_exit(array('flag'=>1,'msg'=>'zeai_cn__forbidden'));
		//
		/*
		require_once ZEAI.'sub/zeai_up_func.php';
		$uid = intval($cook_uid);
		$db->query("DELETE FROM ".__TBL_TIP__." WHERE uid=".$uid." OR senduid=".$uid);
		$db->query("DELETE FROM ".__TBL_LOVEB_LIST__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_MONEY_LIST__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_PAY__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_WXENDURL__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_HONGBAO__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_HONGBAO_USER__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_UCOUNT__." WHERE uid=".$uid);
		//
		$db->query("DELETE FROM ".__TBL_HN_BBS__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_CRM_HT__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_CRM_MATCH__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_CRM_MATCH__." WHERE uid2=".$uid);
		$db->query("DELETE FROM ".__TBL_CRM_FAV__." WHERE uid=".$uid);
		//删无图
		$db->query("DELETE FROM ".__TBL_CLICKHISTORY__." WHERE senduid=".$uid);
		$db->query("DELETE FROM ".__TBL_DATING__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_DATING_USER__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_GIFT_USER__." WHERE uid=".$uid." OR senduid=".$uid);
		$db->query("DELETE FROM ".__TBL_GZ__." WHERE uid=".$uid." OR senduid=".$uid);
		$db->query("DELETE FROM ".__TBL_LOVEB_LIST__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_MONEY_LIST__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_MSG__." WHERE uid=".$uid." OR senduid=".$uid);
		$db->query("DELETE FROM ".__TBL_PARTY_USER__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_PARTY_BBS__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_315__." WHERE uid=".$uid);
		//活动评论，签到
		$db->query("DELETE FROM ".__TBL_PARTY_USER__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_PARTY_BBS__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_PARTY_SIGN__." WHERE uid=".$uid);
		//互选
		$db->query("DELETE FROM ".__TBL_HUXUAN_BMU__." WHERE uid=".$uid);
		$db->query("DELETE FROM ".__TBL_HUXUAN_HXU__." WHERE uid=".$uid);
		//外呼
		$db->query("DELETE FROM zeai_crm_talk WHERE uid=".$uid);
		//视频
		$rt = $db->query("SELECT path_s FROM ".__TBL_VIDEO__." WHERE uid=".$uid);
		$total = $db->num_rows($rt);
		if ($total > 0) {
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt);
				if(!$rows) break;
				$path_s = $rows[0];
				$path_b = str_replace(".jpg",".mp4",$path_s);
				up_send_userdel($path_s.'|'.$path_b);
			}
			$db->query("DELETE FROM ".__TBL_VIDEO__." WHERE uid=".$uid);
		}
		//相册
		$rt=$db->query("SELECT path_s FROM ".__TBL_PHOTO__." WHERE uid=".$uid);
		$total = $db->num_rows($rt);
		if ($total > 0) {
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt);
				if(!$rows) break;
				$path_s = $rows[0];
				$path_b = smb($path_s,'b');
				up_send_userdel($path_s.'|'.$path_b);
			}
			$db->query("DELETE FROM ".__TBL_PHOTO__." WHERE uid=".$uid);
		}
		//认证
		$rt=$db->query("SELECT path_b,path_b2 FROM ".__TBL_RZ__." WHERE uid=".$uid);
		$total = $db->num_rows($rt);
		if ($total > 0) {
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt);
				if(!$rows) break;
				$path_b = $rows[0];$path_b2 = $rows[1];
				up_send_userdel($path_b.'|'.$path_b2);
			}
			$db->query("DELETE FROM ".__TBL_RZ__." WHERE uid=".$uid);
		}
		//动态
		$rt=$db->query("SELECT id,piclist FROM ".__TBL_TREND__." WHERE uid=".$uid);
		$total = $db->num_rows($rt);
		if ($total > 0) {
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt);
				if(!$rows) break;
				$fid = $rows[0];$piclist = $rows[1];
				if (!empty($piclist)){
					$piclist = explode(',',$piclist);
					if (count($piclist) >= 1){
						foreach ($piclist as $value){
							$path_s = $value;
							$path_b = smb($path_s,'b');
							up_send_userdel($path_s.'|'.$path_b);
						}
					}
				}
				$db->query("DELETE FROM ".__TBL_TREND_BBS__." WHERE fid=".$fid);
			}
			$db->query("DELETE FROM ".__TBL_TREND__." WHERE uid=".$uid);
		}
		$db->query("DELETE FROM ".__TBL_TREND_BBS__." WHERE uid=".$uid);
		//主
		$rt = $db->query("SELECT photo_s,tgpic FROM ".__TBL_USER__." WHERE id=".$uid);
		if($db->num_rows($rt)){
			$rows = $db->fetch_array($rt);
			$photo_s = $rows[0];$tgpic = $rows[1];
			$photo_m = smb($photo_s,'m');
			$photo_b = smb($photo_s,'b');
			$photo_blur = smb($photo_s,'blur');
			@up_send_userdel($photo_s.'|'.$photo_m.'|'.$photo_b.'|'.$photo_blur.'|'.$tgpic);
		}
		//
		$row_shalou= shalou_data($uid);
		$shalou_photo_s = $row_shalou['photo_s'];
		if(!empty($shalou_photo_s)){
			$photo_s = $shalou_photo_s;
			$photo_m = smb($photo_s,'m');
			$photo_b = smb($photo_s,'b');
			$photo_blur = smb($photo_s,'blur');
			@up_send_userdel($photo_s.'|'.$photo_m.'|'.$photo_b.'|'.$photo_blur.'|'.$tgpic);
		}
		$db->query("DELETE FROM ".__TBL_USER__." WHERE id=".$uid);
		$db->query("DELETE FROM ".__TBL_SHALOU__." WHERE uid=".$uid);
		//
		只锁定不删除
		*/
		$uid=intval($cook_uid);
		$content = trimhtml(dataIO($content,'in',1000));
		$db->query("INSERT INTO ".__TBL_TEXT__."  (uid,kind,content,addtime) VALUES ($uid,'udel','$content',".ADDTIME.")");	
		$db->query("UPDATE ".__TBL_USER__." SET flag=-1 WHERE id=".$uid);
		ZEclearcookAI_CN();
		json_exit(array('flag'=>1,'msg'=>'注销成功，下次有空来坐坐^_^'));
	break;
	exit;break;case 'my_hidemy':
		if($_VIP['hidedata']!=1)json_exit(array('flag'=>1,'msg'=>'zeai_cn__forbidden'));
		if($data_flag==1){
			$db->query("UPDATE ".__TBL_USER__." SET flag=-2 WHERE id=".$cook_uid);
			json_exit(array('flag'=>1,'msg'=>'个人资料隐藏成功，会员列表将不显示'));
		}else{
			$db->query("UPDATE ".__TBL_USER__." SET flag=1 WHERE id=".$cook_uid);
			json_exit(array('flag'=>1,'msg'=>'开启成功，个人资料显示恢复正常'));
		}
	break;
	exit;break;case 'my_hidephoto':
		if($_VIP['hidephoto']!=1)json_exit(array('flag'=>1,'msg'=>'zeai_cn__forbidden'));
		if($data_photo_ifshow==1){
			$db->query("UPDATE ".__TBL_USER__." SET photo_ifshow=0 WHERE id=".$cook_uid);
		}else{
			$db->query("UPDATE ".__TBL_USER__." SET photo_ifshow=1 WHERE id=".$cook_uid);
		}
		json_exit(array('flag'=>1,'msg'=>'设置成功'));
	break;
	exit;break;case 'ifViewPush_update':
		if($data_ifViewPush==1){
			$db->query("UPDATE ".__TBL_USER__." SET ifViewPush=0 WHERE id=".$cook_uid);
			json_exit(array('flag'=>1,'msg'=>'关闭成功'));
		}else{
			$db->query("UPDATE ".__TBL_USER__." SET ifViewPush=1 WHERE id=".$cook_uid);
			json_exit(array('flag'=>1,'msg'=>'开启成功'));
		}
	break;
}
$nav='my';?>
<!doctype html><html><head><meta charset="utf-8">
<title>设置-<?php echo $_ZEAI['siteName'];?></title>
<?php echo HEADMETA; ?>
<link href="<?php echo RES;?>m/css/m.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo HOST;?>/cache/zeaicolor.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/m.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<style>
/*设置常规资料列表修改*/
.modlist{padding:2rem 0}
.modlist ul{text-align:left}
.modlist ul li{height:5rem;line-height:5rem;overflow:hidden;-webkit-user-select:none;position:relative}
.modlist ul li:after{position:absolute;content:'\e601';width:1rem;height:2rem;display:block;font-size:1.5rem;top:0;right:3rem;color:#c6c6c6;font-family:"www_zeai_cn_iconfont" !important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.modlist ul li.none h4{color:#aaa}
.modlist ul li h4{margin-left:2.8rem;font-size:1.4rem;display:inline-block;color:#333}
.modlist ul li h4 font{font-size:1.2rem;color:#999}
.modlist ul li span{width:60%;display:block;position:absolute;text-align:right;top:0;right:4.6rem;color:#999;font-size:1.4rem;padding-left:2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modlist ul li span img{width:4rem;height:4rem;border-radius:2rem;display:block;float:right;margin-top:.5rem;object-fit:cover;-webkit-object-fit:cover}
.modlist ul.textarea2 li:after{content:'';}
.modlist ul.textarea2 li:hover{background-color:#fff}
.modlist ul.textarea2 textarea{font-size:1.4rem;width:100%;margin:0 auto;height:9rem;border:0;border-bottom:#f5f5f5 1px solid;box-sizing:border-box;padding:1rem 3rem;resize:none}
.modlist{padding-top:0}
.my_set{background-color:#fff;padding:0 0 5rem;text-align:center;margin-top:5.5rem}
.my_set .nogo:after{content:''}
.my_set .nogo span{right:1.5rem}
.my_set .size4{width:90%;border-color:#eee;color:#666;font-size:1.6rem;margin:2rem auto;display:block}
#hidedel_rmbbox{display:none}
#hidedel_rmbbox .ul{width:80%;margin:0 auto}
#hidedel_rmbbox .ul li{width:100%;height:3.2rem;line-height:3.2rem;margin:.5rem 0;border:1px solid #ffdede;color:#333;font-size:1.4rem;display:block;text-align:left;border-radius:1.2rem;padding-left:1.5rem;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}
.switch:checked + label.switch-label{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>;border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.radioskin:checked + label.radioskin-label i:before{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.radioskin:checked + label.radioskin-label i{border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.radioskin:checked + label.radioskin-label b{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
#hidedel_rmbbox .ul li.c{height:9rem;}
#hidedel_btn{margin-top:1rem}
.textarea{width:90%;font-size:1.4rem;border:0}
<?php
if ($_ZEAI['m_mb']==2){
	echo '.TRnav_btn i{color:'.$_ZEAI['mob_mbcolor'].'}';
	$mini_class='top_mini4';
}else{
	$mini_class='top_mini4 zeaibg bgcolor yunbox';
}
?>
</style>
</head><body>
<?php
$mini_title='设置';
require_once ZEAI.'m/top_mini.php';?>
<div class="my_set">
    <div class="modlist">
    	<br><h5 class="C999">保密后别人将无法查看您的联系方式<br />为了您的个人隐私，手机号默认保密状态</h5><br>
        <ul>
            <li class="nogo"><h4>手机号码</h4><span><input type="checkbox" name="mob_ifshow" id="mob_ifshow" class="switch" value="1"<?php echo ($data_mob_ifshow == 1)?' checked':'';?>><label for="mob_ifshow" class="switch-label"><i></i><b>公开</b><b>保密</b></label></span></li>
            <?php if ($_VIP['hideprivacy'] == 1){?>
        	<li class="nogo"><h4>微信号</h4><span><input type="checkbox" name="weixin_ifshow" id="weixin_ifshow" class="switch" value="1"<?php echo ($data_weixin_ifshow == 1)?' checked':'';?>><label for="weixin_ifshow" class="switch-label"><i></i><b>公开</b><b>保密</b></label></span></li>
        	<li class="nogo"><h4>微信二维码</h4><span><input type="checkbox" name="weixin_pic_ifshow" id="weixin_pic_ifshow" class="switch" value="1"<?php echo ($data_weixin_pic_ifshow == 1)?' checked':'';?>><label for="weixin_pic_ifshow" class="switch-label"><i></i><b>公开</b><b>保密</b></label></span></li>
        	<li class="nogo"><h4>QQ</h4><span><input type="checkbox" name="qq_ifshow" id="qq_ifshow" class="switch" value="1"<?php echo ($data_qq_ifshow == 1)?' checked':'';?>><label for="qq_ifshow" class="switch-label"><i></i><b>公开</b><b>保密</b></label></span></li>
        	<li class="nogo"><h4>邮箱</h4><span><input type="checkbox" name="email_ifshow" id="email_ifshow" class="switch" value="1"<?php echo ($data_email_ifshow== 1)?' checked':'';?>><label for="email_ifshow" class="switch-label"><i></i><b>公开</b><b>保密</b></label></span></li>
            <?php }?>
            <?php if ($_VIP['hidedata'] == 1){?><li class="nogo" style="border-top:12px #f8f8f8 solid"><h4>个人资料显示</h4><span><input type="checkbox" name="my_hidemy" id="my_hidemy" class="switch" <?php echo ($data_flag ==1)?' checked':'';?>><label for="my_hidemy" class="switch-label"><i></i><b>显示</b><b>隐藏</b></label></span></li><?php }?>
            <?php if ($_VIP['hidephoto'] == 1){?><li class="nogo"><h4>头像照片显示</h4><span><input type="checkbox" name="my_hidephoto" id="my_hidephoto" class="switch" <?php echo ($data_photo_ifshow ==1)?' checked':'';?>><label for="my_hidephoto" class="switch-label"><i></i><b>显示</b><b>隐藏</b></label></span></li><?php }?>
            <li class="nogo"><h4>谁看过我微信通知</h4><span><input type="checkbox" name="ifViewPush" id="ifViewPush" class="switch" <?php echo ($data_ifViewPush ==1)?' checked':'';?>><label for="ifViewPush" class="switch-label"><i></i><b>开启</b><b>关闭</b></label></span></li>
            <li id="my_modpass" style="border-top:12px #f8f8f8 solid"><h4>修改登录密码</h4><span></span></li>
            <?php if ($_VIP['hidedel'] == 1){?><li id="my_delmy"><h4>注销个人资料</h4><span></span></li><?php }?>
            <?php if (!is_weixin()){?>
            <button type="button" onClick="zeai.openurl('<?php echo HOST;?>/loginout.php')" class="btn size4 BAI yuan">退出当前帐号</button>
            <?php }?>
        </ul>
	</div>
</div>
<?php if ($_VIP['hidedel'] == 1){// && ?>
<div id="hidedel_rmbbox">
	<form class="ul" id="WWW_A9A_CN__FORM">
    
		<li><input type="radio" name="kind" value="脱单了" id="jb1" class="radioskin"><label for="jb1" class="radioskin-label"><i class="i1"></i><b class="W100">脱单了</b></label></li>
		<li><input type="radio" name="kind" value="因被骚扰，所以注销" id="jb2" class="radioskin"><label for="jb2" class="radioskin-label"><i class="i1"></i><b class="W100">因被骚扰，所以注销</b></label></li>
		<li><input type="radio" name="kind" value="怕被熟人看到" id="jb3" class="radioskin"><label for="jb3" class="radioskin-label"><i class="i1"></i><b class="W100">怕被熟人看到</b></label></li>
		<li><input type="radio" name="kind" value="加入找不到对象" id="jb4" class="radioskin"><label for="jb4" class="radioskin-label"><i class="i1"></i><b class="W100">加入找不到对象</b></label></li>
		<li><input type="radio" name="kind" value="红娘不理会，服务不行" id="jb5" class="radioskin"><label for="jb5" class="radioskin-label"><i class="i1"></i><b class="W100">红娘不理会，服务不行</b></label></li>
    	<li class="c">
        <input type="radio" name="kind" value="wwwa9acn" id="jb6" class="radioskin"><label for="jb6" class="radioskin-label"><i class="i1"></i><b class="W100">其他原因</b></label>
        <textarea class="textarea" name="kindc" id="kindc" placeholder="在此输入其他原因" onClick="javascript:jb6.checked=true;"></textarea>
        </li>
        <button type="button" class="btn size3 zeaibg yuan W100_" id="hidedel_btn" onClick="hidedel_btnFn();">提交注销</button>
    </form>
</div>
<script>
function hidedel_btnFn(){
	if(zeai.empty(zeai.form.ifradio('kind'))){
		zeai.msg('亲！麻烦您选择注销原因<br>以便我们改进服务质量<br>提供更优质的服务',{time:5});return false;
	}
	var varr = zeai.form.radio_ed_value('kind'),v=varr.value;
	v=zeai.clearhtmlall(v);
	if(v=='wwwa9acn'){
		kindc.value = zeai.clearhtmlall(kindc.value);
		if(zeai.empty(kindc.value)){
			zeai.msg('请输入其他原因',{time:5});return false;
		}else{
			v = kindc.value;
		}
	}
	content = '用户注销资料：'+v;
	<?php if ($_VIP['hidedel_rmb']>0){?>
	ZeaiM.div_up({obj:czbox,h:<?php echo (is_weixin())?23.5:30.5;?>});
	<?php }else{ ?>
	zeai.ajax({url:'my_set'+zeai.ajxext+'submitok=my_delmy',data:{content:content}},function(e){var rs=zeai.jsoneval(e);
		zeai.msg(0);zeai.msg(rs.msg,{time:4});
		if (rs.flag == 1){setTimeout(function(){zeai.openurl('<?php echo HOST;?>');},3000);}
	});
	<?php }?>
}
</script>
<script src="<?php echo HOST;?>/api/zeai_PAY.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<?php }?>


<div id="my_set_modpassBox" style="display:none">
<form id="ZEAI_form" class="lxbox">
    <style>
    .lxbox {padding-bottom:2rem;margin-top:4rem}
    .lxbox dl{width:90%;padding:1rem 0;clear:both;overflow:auto;margin:0 auto;border-bottom:#eee 1px solid;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}
    .lxbox dl dt,.lxbox dl dd{line-height:34px;text-align:left;float:left}
    .lxbox dl dt{width:30%}
    .lxbox dl dd{width:70%}
    .lxbox .input{width:100%;height:3.4rem;line-height:3.4rem;border:0}
	.lxbox button{margin-top:1.5rem}
    </style>
    <dl><dt>输入旧密码</dt><dd><input name="old_password" type="password" class="input"   id="old_password" maxlength="20" onBlur="zeai.setScrollTop(0);" placeholder="请输入旧密码" autocomplete="off"></dd></dl>
    <dl><dt>输入新密码</dt><dd><input name="form_password1" type="password" class="input" id="form_password1" maxlength="20" onBlur="zeai.setScrollTop(0);" placeholder="请输入新密码" autocomplete="off" /></dd></dl>
    <dl><dt>确认新密码</dt><dd><input name="form_password2" type="password" class="input" id="form_password2"  maxlength="20" onBlur="zeai.setScrollTop(0);" placeholder="再输一次新密码" autocomplete="off"></dd></dl>
    <input name="submitok" type="hidden" value="passmodupdate" />
    <button class="btn size4 zeaibg center W90_" type="button" onclick="my_set_modpass()" >保存并修改</button>
</form>
<script>
    function my_set_modpass(){
        if(zeai.empty(o('old_password').value) || zeai.str_len(o('old_password').value)<6){
            zeai.msg('请输入旧密码6~20个字节内');
            return false;
        }
        if(zeai.empty(o('form_password1').value)){
            zeai.msg('请输入新密码6~20个字节内！');
            return false;
        }
        if(zeai.str_len(o('form_password1').value)>20 || zeai.str_len(o('form_password1').value)<6){
            zeai.msg('新密码请控制在6~20个字节内！');
            return false;
        }
        if(zeai.empty(o('form_password2').value)){
            zeai.msg('请再输入一次新密码');
            return false;
        }
        if(zeai.str_len(o('form_password2').value)>20 || zeai.str_len(o('form_password2').value)<6){
            zeai.msg('新密码请在6~20个字节内！');
            return false;
        }
        if(o('form_password1').value!=o('form_password2').value) {
            zeai.msg('两次密码不一致');
            return false;		
        }
        zeai.ajax({url:MHOST+'/my_set.php',form:ZEAI_form},function(e){var rs=zeai.jsoneval(e);
			zeai.msg(rs.msg);
            if(rs.flag==1){setTimeout(function(){location.reload(true);},1000);}
        });
    }
</script>
</div>
<script> 
zeai.listEach('.switch',function(obj){
	var objname = obj.name;
	obj.onclick = function(){
		var v=(obj.checked)?1:0
		zeai.ajax({url:MHOST+'/my_set'+zeai.ajxext+'submitok=ajax_set&objname='+objname+'&v='+v},function(e){var rs=zeai.jsoneval(e);
			zeai.msg(0);zeai.msg(rs.msg);
		});
	}
});
my_modpass.onclick=function(){
	ZeaiM.div_up({obj:my_set_modpassBox,h:30});
}
<?php if (!empty($a)){?>my_modpass.click();<?php

}if ($_VIP['hidedel'] == 1 && $_VIP['hidedel_rmb']==0){?>
my_delmy.onclick=function(){
	zeai.alertplus({title:'确定要注销个人资料么？',content:'注销后，您将不能登录本站<br>如果真的要注销请点击【确定】',title1:'我再想想',title2:'确定',
	fn1:function(){zeai.alertplus(0);},
	fn2:function(){zeai.alertplus(0);
		ZeaiM.div2({obj:hidedel_rmbbox,title:'请选择注销原因',w:30,h:41});
	}
	});
}
<?php }if ($_VIP['hidedata'] == 1){?>
my_hidemy.onclick=function(){
	zeai.ajax(MHOST+'/my_set'+zeai.ajxext+'submitok=my_hidemy',function(e){var rs=zeai.jsoneval(e);
		zeai.msg(0);zeai.msg(rs.msg,{time:4});
	});
}
<?php }if ($_VIP['hidephoto'] == 1){?>
my_hidephoto.onclick=function(){
	zeai.ajax(MHOST+'/my_set'+zeai.ajxext+'submitok=my_hidephoto',function(e){var rs=zeai.jsoneval(e);
		zeai.msg(0);zeai.msg(rs.msg);
	});
}
<?php }?>
ifViewPush.onclick=function(){
	zeai.ajax(MHOST+'/my_set'+zeai.ajxext+'submitok=ifViewPush_update',function(e){var rs=zeai.jsoneval(e);
		zeai.msg(0);zeai.msg(rs.msg);
	});
}
</script>
<?php if ($_VIP['hidedel'] == 1 && $_VIP['hidedel_rmb']>0){?>
	<script>
	var content='';
    my_delmy.onclick=function(){
        zeai.alertplus({title:'确定要注销个人资料么？',content:'注销后，您将不能登录本站<br>为了补贴网站运营成本<br>将收取注销服务费用<font color=red>￥<?php echo $_VIP['hidedel_rmb'];?>元</font><br><br>确认注销请点击【确定】',title1:'我再想想',title2:'确定',
        fn1:function(){zeai.alertplus(0);},
        fn2:function(){zeai.alertplus(0);
            ZeaiM.div2({obj:hidedel_rmbbox,title:'请选择注销原因',w:30,h:41});
        }});
    }
/*    zeai.listEach(zeai.tag(hidedel_rmbbox,'li'),function(obj){
        obj.onclick = function(){
		content = '用户注销资料：'+obj.innerHTML;
		ZeaiM.div_up({obj:czbox,h:<?php echo (is_weixin())?23.5:30.5;?>});
    }});*/
    </script>
	<?php
	$jump_url = HOST.'/loginout.php';
	$money = floatval($_VIP['hidedel_rmb']);
	$kind  = 9;
	echo '<input type="hidden" id="money" value="'.$money.'">';
	require_once 'my_pay.php';
}
require_once ZEAI.'m/TRnav.php';?>
<div class="blank"></div></body></html>